import QtQuick

Item {
    id: locationParameterBack_ParameterWindow
    width: 1760
    height: 935

    property int location_Parameter_Page_Number: 1

    Component.onCompleted: {
        locationParameterLoader.source = "LocationCompensation_Page_1_ParameterWindow.qml"
        Cpp_PLC.read_Location_Compensate_Parameter_Setting_Hold();
    }


    A_Button{
        anchors.right: locationParameterBack_ParameterWindow.right
        anchors.rightMargin: 30
        anchors.bottom: locationParameterBack_ParameterWindow.bottom
        anchors.bottomMargin: 30
        contentText_Data: qsTr("下 一 页")
        buttonWidth: 300
        buttonHeight: 80
        visible: location_Parameter_Page_Number === 1
        onButtonClicked: {
            location_Parameter_Page_Number = 2
            locationParameterLoader.source = "LocationCompensation_Page_2_ParameterWindow.qml"
        }
    }

    A_Button{
        anchors.right: locationParameterBack_ParameterWindow.right
        anchors.rightMargin: 30
        anchors.bottom: locationParameterBack_ParameterWindow.bottom
        anchors.bottomMargin: 30
        contentText_Data: qsTr("上 一 页")
        buttonWidth: 300
        buttonHeight: 80
        visible: location_Parameter_Page_Number === 2
        onButtonClicked: {
            location_Parameter_Page_Number = 1
            locationParameterLoader.source = "LocationCompensation_Page_1_ParameterWindow.qml"
        }
    }


    Loader{         // 位置补偿加载
        id: locationParameterLoader
        anchors.top: locationParameterBack_ParameterWindow.top
        // anchors.topMargin: 70
        anchors.horizontalCenter: locationParameterBack_ParameterWindow.horizontalCenter

        onSourceChanged: {
            console.log("当前位置补偿界面为: " + source)
        }
    }

}
